package xyz.renyumeng.xkm.pay.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import xyz.renyumeng.xkm.pay.service.PayService;
import xyz.renyumeng.xkm.model.order.OrderInfo;
import xyz.renyumeng.xkm.result.Result;

import javax.annotation.Resource;

/**
 * @author renyumeng
 * @date Created in 9:55 2023/6/30
 */

@Api(tags = "支付接口")
@RestController
@RequestMapping("/admin/pay")
public class PayController {

    @Resource
    private PayService payService;

    @PostMapping
    @ApiOperation(value = "支付一个订单")
    public Result<Long> pay(@RequestBody OrderInfo orderInfo) {
        return payService.pay(orderInfo);
    }

}
